
package hasthi.wsdm.capabilities;

import hasthi.common.HasthiException;
import hasthi.common.HasthiException.FaultCode;
import hasthi.wsdm.ManagedSystemHandle;

import javax.xml.namespace.QName;



public class SimpleCapability extends AbstractCapability{
    public void setProperty(QName name, Object value) throws HasthiException {
        throw new HasthiException("Unsupported property "+name + " set in capability "+ this,FaultCode.InvaliedLocalArgumnet);
    }
   
    public Object getProperty(QName name) throws HasthiException {
        ManagedSystemHandle systemHandle = ownedResource.getSystemHandle();
        Object value = systemHandle.getConfiguration(name);
        if(value != null){
            return value;
        }
        throw new HasthiException("Unsupported property "+name + " requested from capability "+ this,FaultCode.InvaliedLocalArgumnet);
    }
}

